<template>
  <div class="year">
    <el-date-picker
      v-model="value"
      type="year"
      placeholder="选择年"
      @change="getYear">
    </el-date-picker>
  </div>
</template>
 
<script>
export default {
  name: 'vueName',
  data () {
    return {
      value: '2021'
    }
  },
  methods: {
    getYear(v) {
      // console.log(v.getFullYear())
      this.$emit('getYear', v)
    }
  }
}
</script>
 
<style scoped lang="less">
 
</style>